<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    .demo1 {
      line-height: 150%;
      font-size: 16px;
    }

    .demo1 div {
      font-size: 30px;
    }

    .demo2 {
      line-height: 1.5;
      font-size: 16px;
    }

    .demo2 div {
      font-size: 30px;
    }
  </style>
</head>

<body>
  <div class="demo1">
    父元素内容
    <div>
      web前端开发<br>
      line-height行高问题
    </div>
  </div>
  <div class="demo2">
    父元素内容
    <div>
      前端开发<br>
      line-height行高问题
    </div>
  </div>
</body>

</html>